Skip to content

Pin the parameters filter on a plot - #1021

Draft
epompeii wants to merge 1 commit into
u/ep/parameters-api/thresholds-payloadfrom
u/ep/parameters-api/plot-parameters
Draft

Pin the parameters filter on a plot#1021
epompeii wants to merge 1 commit into
u/ep/parameters-api/thresholds-payloadfrom
u/ep/parameters-api/plot-parameters

Conversation

@epompeii

Copy link
Copy Markdown
Member

A pinned plot stores what the perf URL stores.

The other dimensions of a plot are entity references, so they live in join tables of UUIDs. The parameter dimension in query space is not a reference: it is a value predicate, a filter, so the plot stores the same canonical list of sets the perf query takes.

A UUID join table was considered and rejected. A pinned grid point's full set used as a filter also matches future supersets of itself, so UUID pinning cannot faithfully drive the ruled query, and a filter column round-trips "pin the current perf view" exactly.

The field

The plot table gains a nullable parameters column: the SQLite JSONB encoding of a JSON array of parameter sets, the same encoding the threshold column uses. JsonPlot, JsonNewPlot, and the plot patch shape gain parameters after benchmarks and before measures, the canonical dimension order.

NULL is match all, so every plot that predates this migration carries NULL and draws exactly what it drew before. A plot with no filter answers with the field absent, and the migration is a plain ADD COLUMN.

Canonical semantics

The filter means exactly what the perf query's parameters param means: OR across the list, subset match within each set. A grid point matches when any set of the list is a subset of it, so a filter names only the keys it cares about and a grid point that pins more keys still matches.

Canonicalization is ParameterFilter's own, unchanged and unduplicated: each set in its RFC 8785 canonical form, the list sorted by canonical bytes and deduplicated, at most eight sets. A list holding the empty set and the empty list are both match all, and so is an absent field, so all three are one stored state: no filter at all.

On a patch, an absent parameters leaves the plot's filter alone. An explicit null and an empty list both clear it back to every grid point, which are two spellings of one filter and so land on one stored value.

The console will pass the filter through when it builds the perf query. No console change here.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

ProjectBencher
Branchu/ep/parameters-api/plot-parameters
Testbedintel-v1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
Adapter::Json📈 view plot
🚷 view threshold
5.26 µs
(+10.07%)Baseline: 4.78 µs
5.69 µs
(92.57%)
Adapter::Magic (JSON)📈 view plot
🚷 view threshold
5.07 µs
(+9.27%)Baseline: 4.64 µs
5.46 µs
(92.91%)
Adapter::Magic (Rust)📈 view plot
🚷 view threshold
27.98 µs
(+6.85%)Baseline: 26.19 µs
28.87 µs
(96.93%)
Adapter::Rust📈 view plot
🚷 view threshold
4.66 µs
(+24.39%)Baseline: 3.74 µs
5.55 µs
(83.94%)
Adapter::RustBench📈 view plot
🚷 view threshold
4.66 µs
(+24.69%)Baseline: 3.74 µs
5.52 µs
(84.39%)
🐰 View full continuous benchmarking report in Bencher

@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch 2 times, most recently from 284e133 to 9d4a326 Compare August 27, 2026 04:22
A pinned plot stores what the perf URL stores. The `plot` table gains a
nullable `parameters` column holding the canonical filter list, the same
JSONB encoding the threshold column uses, and `JsonPlot`, `JsonNewPlot`,
and the plot patch shape gain the field in the canonical dimension order,
after `benchmarks` and before `measures`.

NULL is match all, so every plot that predates this carries NULL and
draws exactly what it drew before.
@epompeii
epompeii force-pushed the u/ep/parameters-api/plot-parameters branch from 9d4a326 to cf8ffa3 Compare August 27, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant